<!DOCTYPE html>
<html>

	<head>
		<meta charset="UTF-8">
		<title></title>
	</head>
		<script src="http://cdn.static.runoob.com/libs/angular.js/1.4.6/angular.min.js"></script>
        <script src="https://apps.bdimg.com/libs/angular-route/1.3.13/angular-route.js"></script>

	<body ng-app="myapp">
		<div>
			<h1>Head</h1>
			<ul>
				<li><a href="#/">首页</a></li>
				<li><a href="#/user">用户管理</a></li>
				<li><a href="#/product">商品管理</a></li>
			</ul>
			<div ng-view></div>
			<h1>FOOT</h1>
		</div>

		
		<script>
            angular.module('myapp',['ngRoute'])
            .config(['$routeProvider', function($routeProvider){
                $routeProvider
                .when('/',{template:'这是首页页面'})
                .when('/user',{template:'这是电脑分类页面'})
                .when('/product',{template:'这是打印机页面'})
                .otherwise({redirectTo:'/'});
            }]);
        </script>
	</body>

</html>